use sqlx::Executor;
pub (crate) async fn table_data_to_his(table_name: &str,where_cause: &str,tx: &mut sqlx::Transaction<'_, sqlx::MySql>) -> anyhow::Result<()> {
    let sql=format!("INSERT INTO {table_name}_his SELECT * FROM {table_name} WHERE {where_cause}");
    tx.execute(sql.as_str()).await?;
    let sql=format!("DELETE FROM {table_name} WHERE {where_cause}");
    tx.execute(sql.as_str()).await?;
    Ok(())
}